package com.woniuxy.controller;

import com.woniuxy.entity.dto.ReturnOrderDTO;
import com.woniuxy.entity.dto.SignOrderDTO;
import com.woniuxy.service.ReturnOrderService;
import com.woniuxy.service.SignOrderService;
import com.woniuxy.util.PageData;
import com.woniuxy.util.ResponseData;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/returnOrder")
public class ReturnOrderController {
    @Resource
    private ReturnOrderService returnOrderService;

    @PostMapping("/queryReturnOrder")
    public ResponseData<?> queryReturnOrder(@RequestBody PageData<ReturnOrderDTO> pageData){
        return  returnOrderService.queryReturnOrder(pageData);
    }


    @GetMapping("/handleReturn/{orderId}")
    public ResponseData<?> handleReturn(@PathVariable("orderId") String orderId){
        return  returnOrderService.handleReturn(orderId);
    }

}
